﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel.DataAnnotations;
using System.Data.Objects.DataClasses;
using System.ServiceModel.DomainServices.Server;
using MyApp.Data.Resources;

namespace MyApp.Data.Model
{
#pragma warning disable 649
    [MetadataType(typeof(Product.ProductMetadata))]
    public partial class Product
	{
        internal class ProductMetadata
        {
            [Display(ResourceType = typeof(Metadata), Name = "MyApp_Product_Code")]
            public string Code;

            [Display(ResourceType = typeof(Metadata), Name = "MyApp_Product_Description")]
            public string Description;

            [Display(ResourceType = typeof(Metadata), Name = "MyApp_Product_Price")]
            public decimal Price;

            [Display(ResourceType = typeof(Metadata), Name = "MyApp_Product_Stock")]
            public int Stock;

            [Include]
            public ProductCategory ProductCategory;

            [Exclude]
            public EntityCollection<OrderDetail> OrderDetails; //not needed
        }
    }
#pragma warning restore 649
}
